var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.setPartner(0, 9062200, 0, 0);
            cm.getMap().startSimpleMapEffect("那些家伙真是胆大包天，居然敢袭击村庄！全都消灭掉！", 5120159);
            cm.protectWallWave(0);
            cm.setQuestCustomData(9930001, 0);
            cm.protectWallLife(20);
            eim.setProperty("hp", 20);
            cm.fieldEffect_ScreenMsg("defense/count");
            cm.dispose();
            eim.schedule("mob1", 3 * 1000)
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};